In general, digital image data is compressed by an efficient compression method instead of being used as it is because the amount of data is greatly increased owing to its inherent characteristic and in a process of digitalizing an analog signal.
Digital image data is compressed using, chiefly, three kinds of methods. A method of reducing temporal redundancy, a method of reducing spatial redundancy, and a method of reducing generated codes based on a statistical characteristic of the generated codes are chiefly used. A representative method of reducing temporal redundancy is a motion estimation and compensation method, which is being used in most of moving image compression standards, such as MPEG or H.263.
FIG. 1 is a block diagram showing a conventional H.264 moving image coding apparatus.
Referring to FIG. 1, the H.264 moving image coding apparatus includes a motion estimation unit ME 100, a motion compensation unit MC 110, an intra-mode estimation unit 120, a transform/quantization unit 130, an inverse transform/inverse quantization unit 140, an entropy coding unit 150, a deblocking filter 160, and a reference image storage unit 170.
The motion estimation unit 100 performs a function of finding a motion vector from several sheets of reference images and a macroblock mode determination function of finding an optimal macroblock type with the least bit rate and error.
Furthermore, the motion estimation unit 100 estimates an integer pel motion in units of macroblocks and then perform half pel and quarter pel motion estimation.
The motion compensation unit 110 performs a function of acquiring a compensation image from the reference images based on the motion vector and the macroblock mode type found by the motion estimation unit 100. Here, the motion compensation unit 110 is limited to a structure for acquiring a difference between two images, and a process of acquiring subsequent compensation images is continued by the transform/quantization unit 130.
The intra-mode estimation unit 120 performs a function of selecting an optimal intra-estimation mode by performing estimation from adjacent and surrounding blocks when coding a macroblock in an intra mode and performs a function of acquiring a compensation image, subjected to intra-mode estimation, from previously-coded and adjacent blocks using the selected intra-estimation mode.
The transform/quantization unit 130 performs a discrete cosine transform and performs a function of quantizing the transformed coefficients. The inverse transform/inverse quantization unit 140 performs an opposite function to the transform/quantization unit 130.
The entropy coding unit 150 performs entropy coding using bit allocation according to a probability that quantized DCT coefficients will occur.
The deblocking filter 160 performs a function of improving a restoration image, acquired through the inverse transform/inverse quantization unit 140, to an image of a better picture quality. The improved image is stored in the reference image storage unit 170, and it becomes a reference image for subsequently inputted images.
FIG. 2 is a flowchart illustrating a method of the conventional H.264 moving image coding apparatus coding a moving image.
Referring to FIG. 2, the H.264 moving image coding apparatus performs coding on the first macroblock to nth macroblock of an input image frame in units of macroblocks by estimating integer pel, half pel, and quarter pel motions at step S200. After the coding of the image frame is completed at step S202, the H.264 moving image coding apparatus decodes the coded image frame at step S204.
The method of the H.264 moving image coding apparatus coding the macroblocks is described below. After estimating the integer pel motion, the H.264 moving image coding apparatus estimates the half/quarter pel motions with respect to the integer pel motion-estimation image. Next, the H.264 moving image coding apparatus determines a mode and, and transforms, quantizes, and codes the half/quarter pel motion-estimated images using the determined mode.
Next, the H.264 moving image coding apparatus generates a half/quarter pel image by interpolating the decoded image at step S206. The generated half/quarter pel image is used to estimate the motion of a next image.
As described above, all the functions other than the function of generating the half/quarter pel image through interpolation are sequentially performed in order to code one macroblock. The coding of a next macroblock is started after the coding of a previous macroblock is finished. After all the macroblocks are coded, an image decoded from the coded image is obtained. The half/quarter pel image is generated by interpolating the decoded image and is prepared to be used to estimate the motion of a next image.
The above-described H.264 moving image coding apparatus consumes a lot of time in order to perform coding because of a heavy computational load. In particular, some processes, such as motion estimation, the generation of a quarter pel image, and deblocking, require a heavy computational load, thus causing to delay the coding time.
In particular, a block-based coding apparatus, such as H.264, divides an image frame into macroblocks and performs coding in units of macroblocks. The block-based coding apparatus is configured to code a next macroblock after coding a previous macroblock.
In the case where a specific process constituting a step of coding the macroblocks consumes a greater execution time than other processes, a phenomenon in which the entire coding time is delayed by the specific process is generated.
This phenomenon is greatly influenced in terms of performance in the case of a coder having, in particular, a pipeline structure. In order to solve the problem, there is a problem in that the time that it takes to execute processes, requiring a lot of time, is reduced similarly to other processes or the coder structure has to be changed.